package com.yinet.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yinet.system.mapper.HolidayMapper;
import com.yinet.system.domain.Holiday;
import com.yinet.system.service.IHolidayService;
import com.yinet.common.core.text.Convert;

/**
 * 节假日Service业务层处理
 *
 * @author yinet
 * @date 2019-11-14
 */
@Service
public class HolidayServiceImpl implements IHolidayService {
    @Autowired
    private HolidayMapper holidayMapper;

    /**
     * 查询节假日列表
     *
     * @param holiday 节假日
     * @return 节假日
     */
    @Override
    public List<Holiday> selectHolidayList(Holiday holiday) {
        return holidayMapper.selectHolidayList(holiday);
    }

    @Override
    public List<Holiday> selecAllHoliday(String[] statuses) {
        return holidayMapper.selecAllHoliday(statuses);
    }

    /**
     * 新增节假日
     *
     * @param holiday 节假日
     * @return 结果
     */
    @Override
    public int insertHoliday(Holiday holiday) {
        return holidayMapper.insertHoliday(holiday);
    }

}
